var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
var is_safari = (userAgent.indexOf('webkit') != -1 || userAgent.indexOf('safari') != -1);
var note_step = 0;
var note_oldtitle = document.title;
var note_timer;

function warning(element,msg)
{
	var showspan = element.parent().find("span:last-child'");
	if(showspan.length==0)
	{
		showspan = $("<span></span>");
		showspan.appendTo(element.parent());
	}
	showspan.html("");
	showspan.append('<label class="error"> &nbsp; ' +msg + '</label>');
	showspan.addClass('warning');
}

function warning_clear(element)
{
	var showspan = element.parent().find("span:last-child'");
	if(showspan.length==0)
	{
		showspan = $("<span></span>");
		showspan.appendTo(element.parent());
	}
	showspan.html("");
}


function gotoPage(url) {
	location.href =url;
}

function getExt(path) {
	return path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();
}
